#include <iostream>
#include <string>

#include "LabController.hpp"
#include "ncursesHelper.cpp"
#include "choicesHelper.cpp"

using namespace std;

void RunApp();

int main(int argc, char **argv)
{
	if (argc > 1)
	{
		cout << "going to be implemented" << endl;
		return 0;
	}

	RunApp();
	
	return 0;
}

void RunApp()
{
	vector<string> *mainChoices = getMainChoices();
	vector<string> *benchChoices = getBenchNames();

	string welcomString = "Use arrays to select\nSelect What action you like to make";
	string statusString = "You choose number %d with choice name: %s\n";
	string bw = "Use arrays to select\nSelect What benchmark to run";

	const char *ws = welcomString.c_str();
	const char *ss = statusString.c_str();
	const char *bwcs = bw.c_str();

	int choice = runCurses(ws, ss, mainChoices);

	if (choice == 1)
	{
		choice = runCurses(bwcs, ss, benchChoices);
		LabController lc(benchChoices->at(choice - 1));

		lc.initLab();
		lc.run();
	}
	else
	{
		cout << "Exit Selected!" << endl;
	}
}